import httpRequest from '@/utils/httpRequest'

export default {
  get (url, param = {}, openDefaultData = true) {
    return httpRequest({
      url: httpRequest.adornUrl(url),
      method: 'get',
      params: httpRequest.adornParams(param, openDefaultData)
    })
  },
  post (url, data = {}, openDefaultData = false, contentType = 'json') {
    return httpRequest({
      url: httpRequest.adornUrl(url),
      method: 'post',
      data: httpRequest.adornData(data, openDefaultData, contentType)
    })
  }
}
